package com.zcy.tag2;

import java.io.IOException;
import java.io.StringWriter;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.JspFragment;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class ModifyBodyContent extends SimpleTagSupport {
	@Override
	public void doTag() throws JspException, IOException {
		StringWriter stringWriter=new StringWriter();
		JspFragment jspFragment = getJspBody();
		jspFragment.invoke(stringWriter);
		String content=stringWriter.toString();//返回标签体重的内容
		System.out.println(content);
		
	}
}
